home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 7.5 KB | 130 lines | [TEXT/GEOL] |
- Item 2065999 19-Jan-91 13:06PST
-
- From: SPA0137 Objectsoft SA, Spain,IDV
-
- To: MACAPP.TECH$ MacApp Technical
-
- cc: BERDAHL Amoco Tech, Eric Berdahl,VAR
- PHAROS.TECH Pharos Tech, Tech Staff,PRT
- INFO-PASCAL++@CAMBRIDGE.APPLE.COM@INTERNET#
-
- Item forwarded by SPA.DTS to SPA0144
-
- ------------------------------------------------------------------------------
-
- Sub: War in the Language Gulf
-
- Well, its been some months since flames came shooting out of my in box and I've
- finally had my fill of this Pascal 9X compared to C++ nonsense so here goes.
-
- I originally started programming in Pascal because it was the first language to
- popularize identifiers longer than eight or even two characters, (sorry C still
- had only eight back then and it still shows) and because it allowed me to add
- my own data types to the language. Also because I liked the way my algorithms
- looked when written in Pascal. Now lately I've read some mail offering to
- convert my Pascal to C, the more portable language, ha! I've just spent a few
- hours with the source of Bison, the Yacc replacement trying to compile it under
- MPW and if anyone else calls C portable I think I will retch. Furthermore, if
- you've ever tried to write you own parser driver for Yacc by modifying an
- existing one then you've seen a host of variables like yylloc, and yytloc.
- Well, about the only thing you CAN do is say, "Why, why…?"
-
- Now I've read that C++ lets you "express your ideas in a greater number of ways
- and with a finer degree of distinction" and that "everyone’s doing it and
- you’ll be cool?". I believe the last reason is probably the only one with a
- grain of truth to it. I've heard that C++ is the right tool for some jobs and
- that Pascal 9x is the result of feature envy on the part of Pascal programmers.
- I don't know about anyone else out there, but I've read some of the C++
- archives and I don't envy anybody who uses that language. They seem to spend a
- lot of time trying to get things to work right.
-
- Ken Addison, in a link to me long ago when I was getting zapped for Pascal++
- and Multiple Inheritance comments, pointed out that the real issue is analysis
- and design and not really the choice of language. I have to agree with him but
- I'd like to go a bit farther along with this topic. I think that it is hard for
- people to say what makes a good piece of program code, and although words like
- elegant, simple and obvious spring to mind, I don't think anyone has figured
- out how to make a compiler check for these things. This is precisly the
- problem. Sure you can write "object oriented" code in COBOL and it might even
- look beautiful to another COBOL programmer. But it is this "analysis and
- design" part that made it look good. However, if you are really doing good
- analysis and design, doesn't it make sense to implement in a language that is
- also elegant and simple? For the sake of maintainability and reusability (even
- if reuse by copy and paste) doesn't it make sense to choose a language based
- upon its simplicity instead of some criteria like a greater number and finer
- degree of features? Or a kinder and gentler preprocessor?
-
- In light of some of the links, I'm not even going to bother with the
- readability argument for Pascal. If you find C++ more readable that's your
- business. No doubt Russians find cyrillic readable. Let's assume that each is
- equally readable. I think its not a question of which language is more readable
- but of which group of programmers wants to be more readable. Clearly it is an
- issue of philosphy.
-
- So what bothers me isn't the discussion about languages. It isn't reading a
- bunch of links about obscure C++ features. What worries me is complicated
- e-mail adresses like info-pascal++@cambridge.apple.com@INTERNET#, and other
- uses of #$&|%++ in what should be plain, if not simple, English. As far as I
- know there is no group of Pascal programmers out there who regularly have a
- contest to write obfuscated code. The same cannot be said for C. (Check out
- your old CD-ROMs if you don't believe) I think that Pascal programmers would be
- loath to enter a Obfuscated Pascal contest whereas C programmers obviously
- delight in such things. This doesn't mean that C++ programmers are writing bad
- code or are guilty of poor design. However until they prove otherwise, they are
- guilty by association.
-
- However the Pascal interfaces to MacApp are getting more and more obfuscated
- anyway. Are we going to have a high priesthood of Mac programmers now? If I
- wanted to belong to a priesthood I could get a very lucrative job working in
- 370 assembler.
-
- Who can look at the current MacApp source and tell me with a straight face that
- it is elegant and simple? It is based upon some elegant and simple ideas, but
- they seem to be getting lost in the code. Some new language features would help
- make MacApp better for sure. But it reminds me of the hoopla over structured,
- goto-less programming in the '70s. So far, no matter how many nice features are
- added to programming languages, someone can figure out how to write gargbage
- code with them. In many cases, the wealth of features just means that the
- majority of code will be even more incomprehensible because programmers have a
- tendency to try and use every feature if they can. I think this is really the
- point the people who don't use C++ are trying to make. (And this is a potential
- land mine in a new Pascal that might have too many new features.)
-
- What will make our class libraries better is not adding new features to the
- language, but adding more and better design up-front. It won't matter if they
- are written in C++ if the design is done right. But it would be nice to see the
- algorithms written in a language that everyone can read easily without trying
- to figure out which of 1000 features is being used at each turn. But if this
- doesn't happen then so be it. And if in the future we all end up working with
- class libraries that make the Obfuscated C contest look like a seminar on good
- programming style, it will be because we didn't pay any attention to the
- philosphy of readability.
-
- Back when I started programming Apple computers, the idea was to make things
- simple for the user. (This wis pre-Macintosh, by the way) The argument is that
- simplicity and power are not at odds with each other. Are programmers not
- users? Lately it seems that Macintosh programmers crave complexity at a dire
- cost to ourselves and the users. Meanwhile the whole Apple organization is
- running on the momentum of ideas that nobody seems to be able to express
- verbally or otherwise anymore. I see more and more AppleLinks with UNIX headers
- at the top, forcing me to scroll just to read some English. The Tech Notes keep
- growing while the Human Interface guys cry out like voices in the wilderness.
- If you just started programming the Macintosh (in other words you never used a
- Lisa) then wake up! Stop using preprocessors and scripts and shells and working
- on CAD systems that only the shop-floor robots can understand. If you like
- bits, and inline code then use your talent to build a nice interactive object
- environment that mortals can use to write some really neat stuff! Somewhere
- between HyperTalk and MPW Object Pascal lies a really good language.
-
-
- Spilling the soup on everyone,
-
- Barry Wilson
- ObjectSoft
-
- P.S. Why not go to the horse's mouth on this subject. I've never seen Object
- Oberon's design, but I'm sure it can't be all bad. Wirth has a good track
- record on language design. Even if he hasn't published anything maybe he'll be
- willing to share with Apple on this.
-
-